The present invention relates to an optical encoder used for measuring a displacement of a movable member with high resolution.
Such an optical encoder is incorporated, for example, in a precision measuring apparatus, a drum rotation controlling device and a scanner for a copy machine, an ink-jet printer or the like.
German Laid-Open Patent Application (DE A1) No. 2,316,248 discloses an example of an optical encoder of such a kind. FIG. 1 is an illustration showing a structure of the encoder described in DE A1 2,316,248. The optical encoder comprises light source 101, a lens 102 which collimates a light beam from the light source 101, two diffraction gratings 103 and 104 on which the collimated light beam is incident, a condenser lens 105 and light receiving elements 106, 107 and 107'.
The diffraction grating 103 is fixed, and the diffraction grating 104 is movable. The pitch A.sub.1 of the grating 103 is the same as the pitch A.sub.2 of the grating 104. Hereinafter, the diffraction grating 103 is referred to as a fixed diffraction grating, and the diffraction grating 104 is referred to as a movable diffraction grating.
In the above-mentioned encoder, a light beam emitted by the light source 101 is collimated by the lens 102 and is incident on the fixed diffraction grating 103 and then the movable diffraction grating 104. The collimated light beam generates at least a first diffraction beam when passing through the gratings 103 and 104. If the pitch A.sub.1 and A.sub.2 are sufficiently larger than the wavelength of the collimated light beam, higher order diffraction beams may be generated.
FIG. 2 is an illustration for explaining the diffraction beams generated by the gratings 103 and 104. In FIG. 2, for example, the first order diffraction beam generated at the fixed diffraction grating 103 is transmitted through the movable diffraction grating 104, and received by the light receiving element 107 via the lens 105. Additionally, the first order diffraction beam of the light beam transmitted through the fixed diffraction grating 103 without diffraction is generated by the movable diffraction grating 104, and is also received by the light receiving element 107 via the lens 105. As the movable diffraction grating 104 is moved in a direction indicated by an arrow R, the diffraction beams generated by the movable diffraction grating 104 changed in their phase, while the phase of the original light beam transmitted through the fixed diffraction grating 103 and the movable diffraction grating 104 remains unchanged. That is, for example, the phase of the light beam A is not changed but the phase of the light beam B is changed. This results in phase shift of interference fringes generated by the light beams A and B on the light receiving element 107.
In this encoder, since the pitches A.sub.1 and A.sub.2 of the two gratings 103 and 104 are equal to each other, diffraction angles of the diffraction beams having the same order at each of the gratings are the same. Accordingly, the light beams A and B are parallel to each other immediately after exiting the grating 104. If the light beams A and B are incident on the light receiving element 107 as is in their parallel relationship, interference fringes generated on the light receiving element 107 have relatively large intervals. The interference fringes having such large intervals are not suitable to use for measuring the displacement of the movable diffraction grating 104 because a sufficient number of interference fringes are not formed on the light receiving element 107.
In order to form interference fringes having a suitable interval, the condenser lens 105 is provided between the movable diffraction grating 104 and the light receiving element 107 so that the distance between the light beams A and B narrows. According to this, as the movable diffraction grating 104 is displaced, the interference fringes are moved on the light receiving element 107, resulting in a sinusoidal change in the amount of light received by the light receiving element 107. Specifically, if the movable diffraction grating 104 moves a small distance corresponding to a single pitch of the grating, the level of output from the light receiving element 107 varies like a single period of sine wave. By sensing this change, the amount of the displacement of the movable diffraction grating 104 can be determined.
In the above-mentioned example, although the description was given using the combination of one of the first diffraction beams generated on one side of the optical axis and the original light beam transmitted through the grating (hereinafter referred to as direct transmission beam), the combination of the other first diffraction beam and the direct transmission beam may be used to form interference fringes on the light receiving element 107' as indicated by C and D in the figure.
As for the light source used for the above-mentioned kind of encoder, a semiconductor laser (LD) is used because of requirements for compactness and a high output. However, there is a problem in that the semiconductor laser has high dependency in its wavelength, that is, the wavelength varies due to temperature changes. Accordingly, due to the temperature change, the diffraction angle at the gratings 103 and 104 is changed, and thus the optical path in the encoder may be changed. This condition may result in that the suitable fringes to generate output of the light receiving element are not formed on the light receiving element. In an extreme case, the diffraction beam is directed beyond the edge of the lens 5. For example, as shown in FIG. 3, when the temperature changes, the light beams A and B may be directed to paths indicated by A' and B', respectively. In order to avoid the effect of temperature change, the diffraction angle may be minimized by increasing the pitches A.sub.1 and A.sub.2. In such a case, however, resolution of the encoder may be decreased.